<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7">
    <title>悦定后台管理系统</title>

    <!--判断是否登陆-->
    <script type="text/javascript" src="../../vendor/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="../../js/config.js"></script>
    <script type="text/javascript" src="../../js/jquerySession.js"></script>
    <script type="text/javascript">
        if ($.session.get('token') == null) {
            alert("用户未登录！");
            window.location.href = "../../login.html"
        }
    </script>

    <link href="../../css/reset.css" rel="stylesheet" type="text/css">
    <link href="../../css/system.css" rel="stylesheet" type="text/css">
    <link href="../../css/table_form.css" rel="stylesheet" type="text/css">
    <link rel="alternate stylesheet" type="text/css" href="../../css/styles2.css" title="styles2" media="screen">
    <link rel="alternate stylesheet" type="text/css" href="../../css/styles3.css" title="styles3" media="screen">
    <link rel="alternate stylesheet" type="text/css" href="../../css/styles4.css" title="styles4" media="screen">
    <script language="javascript" type="text/javascript" src="../../vendor/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="../../js/admin_common.js"></script>
    <script language="javascript" type="text/javascript" src="../../js/styleswitch.js"></script>
    <script language="javascript" type="text/javascript" src="../../js/formvalidator.js" charset="UTF-8"></script>
    <script language="javascript" type="text/javascript" src="../../js/formvalidatorregex.js" charset="UTF-8"></script>
    <script charset="utf-8" src="../../vendor/kindeditor-all.js"></script>
    <script charset="utf-8" src="../../vendor/zh-CN.js"></script>
    <script type="text/javascript">
        var editor;
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }
        var matchId = getUrlParam("matchId");
        KindEditor.ready(function (K) {
            editor = K.create('#editor_id', {
                allowFileManager: true,
                uploadJson: "http://118.178.86.71:8080/yueding-service/api/v1/files",//如果这个地址是公开的上传接口
                themeType: 'default',
                afterBlur: function () {
                    this.sync();
                }
            });
            $.getJSON(baseUrl + "/matches/" + matchId + "", {matchId: matchId}, function (json) {
                if (json.meta.code == "200"){
                    var data = json.data;
                    editor.html("");
                    editor.html(data.introduction);
                }
            });
        })
    </script>
    <script type="text/javascript">window.focus();</script>
    <link href="../../css/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="subnav">
</div>
<style type="text/css">
    html {
        _overflow-y: scroll
    }
</style>
<script type="text/javascript">
    $(function () {
        $.formValidator.initConfig({
                    formid: "myform", autotip: true, onerror: function (msg, obj) {
                        window.top.art.dialog({
                                    content: msg, lock: true, width: '200', height: '50'
                                }
                                , function () {
                                    this.close();
                                    $(obj).focus();
                                }
                        )
                    }
                }
        );
        $("#channelstr").formValidator({
                    onshow: "请输入类别名称", onfocus: "请输入类别名称", oncorrect: "输入正确"
                }
        ).inputValidator({
            min: 1, onerror: "请输入类别名称"
        });
    })
</script>

<form name="myform" id="myform">
    <div class="pad-10">
        <div class="col-tab">
            <div id="div_setting_1" class="contentList pad-10">
                <table width="100%" class="table_form ">
                    <tbody>
                    <tr>
                        <td>
                            <div class="ke-container ke-container-default" style="width: 650px;"></div>
                            <textarea id="editor_id" name="content" style="width: 600px; height: 300px; display: none;">

                            </textarea>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div class="bk15"></div>
            <input name="dosubmit" type="submit" id="dosubmit" value="提交" class="button" style="display: none">
        </div>

    </div>
    <!--table_form_off-->

</form>
<script language="JavaScript">
    <!--
    window.top.$('#display_center_id').css('display', 'none');

    //-->
</script>
</body>
</html>